home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / wb / czesc_4 / vark15 / utils a-o / megafloppy.lha / megaflop.doc < prev    next >
Text File  |  1996-07-16  |  7KB  |  245 lines

  1.  
  2.    The Megafloppy package
  3.    ----------------------
  4.    by David Balazic in 1996
  5.    
  6. Contents :
  7.  
  8.      1. Copyright
  9.      2. Beta release
  10.      3. What is this anyway ?   ( a description of the package )
  11.      4. Description of programs
  12.      5. Usage of (z)read, (z)write , code and decode
  13.      6. Using (z) and and non (z) versions of read and write
  14.      7. Working ... not working
  15.      8. Coding
  16.      9. Authors address
  17.  
  18.  
  19. 1. Copyright
  20.  
  21.   This is FREEWARE !!!!!!
  22.   Meaning that U can use it and spread without involving any money.
  23.   
  24.   U may NOT disassemble it, reverse engineer it, include in other
  25.   software or other packages etc...
  26.   
  27. 2. This is a very beta release !
  28.  
  29.    I may contain bugs and may crash Your system.
  30.    And it doesnt even work properly when it doesnt crash :(
  31.    
  32. 3. What is this anyway ?
  33.  
  34.    This package includes some files from my xfloppy.device project
  35.    ( suggestions for an other name are welcome )
  36.  
  37.    xfloppy.device is a driver for floppies which looks like trackdisk.device
  38.    and works with the floopy drives, but ( tada... ) saves 1120 kb on a
  39.    DD floppy. ( HD support for 2320 kb is in plan )
  40.  
  41.    With the programs in this package U can write and read back 1120 kb of
  42.    data to/from a normal DD floppy !
  43.    
  44.  
  45. 4. Description of the programs
  46.  
  47. split :
  48.  
  49.    Synopsis : split <file> <part-size>
  50.    
  51.    Splits <file> in chunks of <part-size> bytes.
  52.    Can be used to chop big files in smaller pieces which can them be
  53.    manipulated with the following tools.
  54.  
  55. (z)read :
  56.  
  57.    Synopsis : (z)read <file> [track]
  58.  
  59.    (z)read reads a raw track ( default is track 0 , range 0-159 ) into
  60.    memory with the trackdisk command TD_RAWREAD and saves it to the <file>.
  61.  
  62.    The difference between read and zread is that zread sets the 
  63.    TDF_INDEXSYNC flag and thereby staret reading the data aproximatly after
  64.    the index mark on floppy.
  65.    Look in section 6. for more info on this 
  66.    
  67. (z)write :
  68.  
  69.    Synopsis : (z)write <file> [track]
  70.    
  71.    (z)write write the contents of <file> to track [track] ( default is 0 )
  72.    using TD_RAWWRITE.
  73.    Again zwrite uses INDEXSYNC and write doesn't.
  74.    Look in section 6. for more info on this
  75.    
  76. code : 
  77.  
  78.    Synopsis : code <infile> <outfile> <legth>
  79.  
  80.    code reada <length> bytes from <infile> codes it (look in 8. Coding)
  81.    and writes it to <outfile>.
  82.    
  83. decode :
  84.  
  85.    Synopsis : decode <infile> <outfile> <legth>
  86.    
  87.    decode decodes <lenght> bytes from <infile> and writes them to <outfile>.
  88.  
  89.  
  90. megafloppy :
  91.  
  92.   This is an "user-friendly" compilation of former tools.
  93.   It should ( look in 7. working ... not working ) read and write large files
  94.   to floppyes saving 1120 kb to one floppy.
  95.   
  96.   the arguments :
  97.  
  98.     READ         - read from disk to file
  99.     WRITE        - write to disk from file
  100.  
  101.     FILE         - file name , - for stdio
  102.  
  103.     UNIT         - floppy unit
  104.  
  105.     FILEOFFSET   - offset in the file to start reading from,
  106.                  when writing ( WRITE ) to floppy
  107.  
  108.     DISKOFFSETB
  109.     DISKOFFSETT  - offset on the floppy to start reading/writing,
  110.                    in (T)racks or (B)ytes
  111.  
  112.     DATALENB
  113.     DATALENT     - amount of data to be copied in (B)ytes or (T)racks
  114.  
  115.     ASKDISK      - ask for floppy if none inserted ( not implemented yet )
  116.  
  117.     QUIET        - be quiet, no output
  118.  
  119. Usage:
  120.  
  121.  - write a 500 kb file to floppy
  122.    > megafloppy write 500kfile
  123.  
  124.  - read it back
  125.    > megafloppy read 500kfile2 datalenb 512000
  126.    
  127.  - write 32 kbytes from file testfile to floppy starting at track 55
  128.    > megafloppy write testfile diskoffsett 55 datalenb 32768
  129.    
  130.  - read it back
  131.    > megafloppy read testfile.head diskoffsett 55 datalenb 32768
  132.  
  133.  - write the second 8 kb of file xfile to floppy
  134.    > megafloppy write xfile datalenb 8192 fileoffset 8192
  135.    
  136.  
  137. 5. Usage of (z)read, (z)write , code and decode
  138.  
  139.    Using these tools U can write some data to a track on the floppy
  140.    
  141.    Examples :
  142.    - write 6000 bytes from testfile to track 0
  143.  
  144.    > code testfile test.coded 6000
  145.  
  146.    this creates the file test.coded which contains the first 6000 bytes
  147.    of file testfile in coded form.
  148.  
  149.    > (z)write testfile.coded
  150.  
  151.    this writes the contents of testfile.coded to track 0 of the internal
  152.    floppy ( unit 0 )
  153.   
  154.    - read these 6000 bytes back 
  155.    
  156.     > (z)read read.raw 
  157.     
  158.     ... reads track 0 into file read.raw
  159.     
  160.     > decode read.raw decoded.file 6000
  161.     
  162.     decodes 6000 bytes from read.raw and saves them to decoded.file
  163.     
  164.     Now the first 6000 bytes of files testfile and decoded.file should
  165.     be same
  166.     ooops I forgot to include a file comparing utility, but as a hacker
  167.     U sure own some tool like that :)
  168.     
  169.     But it may fail for different reasons :
  170.  
  171.     - the disk cannot hold the data. this may happen , because I used
  172.       a pretty demanding coding ( look in 8. Coding )
  173.       the decode program will probaly report an error or just produce
  174.       a bad output file
  175.       
  176.     - error in the coding procedure
  177.       I may had made an error in the (de)coding algorhytms ... :(
  178.       
  179.     - bad will of the gods
  180.       cant help against .... :)
  181.       
  182.       
  183.   U may repeat the former steps using other number of bytes, like
  184.   7168 ( 14 * 512 , the base of xfloppy.device , 14 sectors per track )
  185.   or even more ....
  186.   
  187. 6. Using (z) and and non (z) versions of read and write
  188.  
  189.   There is no much difference in which versions U use.
  190.   If U use the (z) versions , then all data will be aligned to the
  191.   index sync mark. This method is used in megafloppy and xfloppy.device.
  192.   
  193.   Index sync may be broken ( ??? ) on some drives , then (z) programs
  194.   will act just like the other ones.
  195.   
  196.   IMPORTANT: 
  197.   zread can only read back properly ( well, zread will work, but then
  198.   decode will fail ... ) data which was saved by zwrite.
  199.   
  200.   read can read back every type of saved data . try it if zread fails.
  201.   
  202.  
  203. 7. Working ... not working
  204.  
  205.    Recently I discovered that the procedure fails for some kind of input
  206.    data :(((
  207.    for example the browser.lha archive failed at decoding at file offset ~50k
  208.    ... then it failed right on the beginning :((
  209.    
  210.    for a while I saved and read back using (z)read/(z)write/code/decode
  211.    quite a lot of data and worked OK.
  212.  
  213.  
  214.    So please report me about Your success and/or failure.
  215.    
  216.    Oh... To be able to save 7168 bytes to a track and use megafloppy
  217.    the tracklen on Your drive must be at least 12300 bytes ( if I
  218.    remember it right .... )
  219.  
  220. 8. Coding
  221.  
  222.    To achieve more capacity of floppy I used an enhanced data coding
  223.    instead of MFM ( which is normaly used on amiga and other computers )
  224.    
  225.    My method has ratio 1 : 1 + 2/3    ( 1 : 5/3 )
  226.    while MFM has 1 : 2
  227.    
  228.    which means that MFM codes 100 bits to 200 bits
  229.    and my method codes 100 bits to 166 bits !
  230.     
  231. 9. Authors address
  232.  
  233.    snail mail :
  234.  
  235.       David Balazic
  236.       Centiba 39
  237.       SLO-9220 LENDAVA
  238.       Slovenija
  239.    
  240.    E-mail : david.balazic@uni-mb.si
  241.   
  242.    home page : http://www.uni-mb.si/~uel003r2a
  243.    
  244.  
  245.